<?php defined('SYSPATH') or die('No direct script access.');

class Helper_Admin
{
    public static function menu($current = 'review')
    {
        $menu = array(
            'Основное' => array(
                'products/reviews' => 'Товары и отзывы',
                'widgets/reviews' => 'Виджеты',
            ),
            'Настройки' => array(
                'index/shop' => 'Магазин',
                'index/profile' => 'Профиль',
            ),
            'Полезное' => array(
                'index/start' => 'Быстрый старт',
            ),
        );
        
        $content = new View('admin/_menu_tpl');
        $content->menu = $menu;
        $content->current = $current;
        return $content;
    }
    
    public static function get_url()
    {
        return '/admin/id'.ORM::factory('shop')->get_current()->id;
    }
    
    public static function pagination($page, $per_page, $count, $url)
    {
        $content = new View('admin/_pagination_tpl');
        $content->page     = $page;
        $content->per_page = $per_page;
        $content->count    = $count;
        $content->url      = $url;
        return $content;   
    }
} 
